<template>
  <div class="annual-page">
    <div class="container-content">
      <div class="title">
        <span>专家评审管理/详情</span>
        <span class="back-btn" @click="backBtn"
          ><img src="../../assets/images/icon_comm_back.png" alt="" />返回</span
        >
      </div>
      <!-- 标题 基本信息-->
      <div class="content-title-right">
        <div class="right-title">
          <img src="../../assets/images/icon_16_title.png" alt="" /> 基本信息
        </div>
        <el-descriptions border :column="1">
          <el-descriptions-item
            label="任务名称"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
          >
            <span>
              {{ reviewTask.taskName }}
            </span>
          </el-descriptions-item>
          <el-descriptions-item
            label="抽取时间"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
          >
            <span>
              {{ reviewTask.extractTime }}
            </span>
          </el-descriptions-item>
        </el-descriptions>
      </div>
      <!-- 标题 项目信息-->
      <div class="content-title-right">
        <div class="right-title">
          <img src="../../assets/images/icon_16_title.png" alt="" /> 项目信息
        </div>
        <el-descriptions border :column="2">
          <el-descriptions-item
            label="项目名称"
            :span="2"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
            ><span
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              >{{
                annualDeclaration.entryName ? annualDeclaration.entryName : ""
              }}</span
            ><span
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              >{{
                supplementaryDeclaration.entryName
                  ? supplementaryDeclaration.entryName
                  : ""
              }}</span
            >
          </el-descriptions-item>
          <el-descriptions-item
            label="项目性质"
            :span="1"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
            ><span
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              >{{annualDeclaration.entryName ? '年度项目' : ''}}</span
            ><span
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              >{{supplementaryDeclaration.entryName ? '增补项目' : ''}}</span
            >
          </el-descriptions-item>
          <el-descriptions-item
            label="项目类别"
            :span="1"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
            ><span
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              >{{annualDeclaration.projectCategory === "0"
                ? "建设类（新开工）"
                : annualDeclaration.projectCategory === "1"
                ? "建设类（续建）"
                : annualDeclaration.projectCategory === "2"
                ? "购买服务类"
                : annualDeclaration.projectCategory === "3"
                ? "运维类"
                : annualDeclaration.projectCategory === "4"
                ? "其他"
                : annualDeclaration.projectCategory
            }}</span
            ><span
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              >{{
                supplementaryDeclaration.entryName
                  ? supplementaryDeclaration.entryName
                  : ""
              }}</span
            >
          </el-descriptions-item>
          <el-descriptions-item
            label="项目投资估算(万元)"
            :span="1"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
            ><span
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              >{{
                annualDeclaration.projectInvestmentEstimation ? annualDeclaration.projectInvestmentEstimation : ""
              }}</span
            ><span
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              >{{
                supplementaryDeclaration.projectInvestmentEstimation
                  ? supplementaryDeclaration.projectInvestmentEstimation
                  : ""
              }}</span
            >
          </el-descriptions-item>
          <el-descriptions-item
            label="资金来源"
            :span="1"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
            ><span
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              >{{
                annualDeclaration.sourceOfFunds == "0" ? "区财政资金" : annualDeclaration.sourceOfFunds == "1" ? "其他" :""
              }}</span
            ><span
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              >{{
                supplementaryDeclaration.sourceOfFunds == "0" ? "区财政资金" : supplementaryDeclaration.sourceOfFunds == "1" ? "其他" :""
              }}</span
            >
          </el-descriptions-item>
          <el-descriptions-item
            label="项目建设理由"
            :span="2"
            label-class-name="descriptions-item-label-box descriptions-item-height"
            content-class-name="descriptions-item-content descriptions-item-height"
            ><span
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              >{{ annualDeclaration.reasonsForProjectConstruction }}</span
            ><span
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              >{{
                supplementaryDeclaration.reasonsForProjectConstruction
              }}</span
            ></el-descriptions-item
          >
          <el-descriptions-item
            label="项目内容简介"
            :span="2"
            label-class-name="descriptions-item-label-box descriptions-item-height"
            content-class-name="descriptions-item-content descriptions-item-height"
            ><span
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              >{{ annualDeclaration.projectContentIntroduction }}</span
            ><span
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              >{{ supplementaryDeclaration.projectContentIntroduction }}</span
            ></el-descriptions-item
          >
          <el-descriptions-item
            label="预期效果描述"
            :span="2"
            label-class-name="descriptions-item-label-box descriptions-item-height"
            content-class-name="descriptions-item-content descriptions-item-height"
            ><span
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              >{{ annualDeclaration.expectedEffectDescription }}</span
            ><span
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              >{{ supplementaryDeclaration.expectedEffectDescription }}</span
            ></el-descriptions-item
          >
          <el-descriptions-item
            label="项目进展"
            :span="2"
            label-class-name="descriptions-item-label-box descriptions-item-height"
            content-class-name="descriptions-item-content descriptions-item-height"
            ><span
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              >{{ annualDeclaration.workCompletion }}</span
            ><span
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              >{{ supplementaryDeclaration.preliminaryWorkCompletion }}</span
            ></el-descriptions-item
          >
          <el-descriptions-item
            label="增补凭证"
            :span="2"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content "
            v-if="supplementaryDeclaration.supplementaryVoucherFile"
          >
            <span
            class="pointer blueColor"
            @click="$download(supplementaryDeclaration.supplementaryVoucherFile.fileUrl)"
              ><img src="@/assets/images/tripartite/icon_files.png" />{{
                supplementaryDeclaration.supplementaryVoucherFile.fileName
              }}</span
            ></el-descriptions-item
          >
          <el-descriptions-item
            label="项目建议书"
            :span="2"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content "
          >
            <span
              class="pointer blueColor"
              @click="$download(annualDeclaration.projectProposalFile.fileUrl)"
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              ><img
                src="@/assets/images/tripartite/icon_files.png"
                v-show="
                  annualDeclaration.projectProposalFile &&
                  annualDeclaration.projectProposalFile.fileUrl
                "
              />{{
                annualDeclaration.projectProposalFile &&
                annualDeclaration.projectProposalFile.fileName
                  ? annualDeclaration.projectProposalFile.fileName
                  : ""
              }}
            </span>
            <span
            class="pointer blueColor"
            @click="$download(supplementaryDeclaration.projectProposalFile.fileUrl)"
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              ><img
              
                src="@/assets/images/tripartite/icon_files.png"
                v-show="supplementaryDeclaration.projectProposalFile !=undefined"
              />{{ supplementaryDeclaration.projectProposalFile!=undefined ?supplementaryDeclaration.projectProposalFile.fileName:'' }}</span
            ></el-descriptions-item
          >
        </el-descriptions>
      </div>
      <!--标题 联系方式 -->
      <div class="content-title-right">
        <div class="right-title">
          <img src="../../assets/images/icon_16_title.png" />联系方式
        </div>
        <el-descriptions border :column="2">
          <el-descriptions-item
            label="业主单位"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
            ><span
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              >{{ annualDeclaration.constructionUnit }}</span
            ><span
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              >{{ supplementaryDeclaration.constructionUnit }}</span
            ></el-descriptions-item
          >
          <el-descriptions-item
            label="责任科室"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
            ><span
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              >{{ annualDeclaration.department }}</span
            ><span
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              >{{ supplementaryDeclaration.department }}</span
            ></el-descriptions-item
          >
          <el-descriptions-item
            label="项目负责人"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
            ><span
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              >{{ annualDeclaration.projectLeader }}</span
            ><span
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              >{{ supplementaryDeclaration.projectLeader }}</span
            ></el-descriptions-item
          >
          <el-descriptions-item
            label="负责人电话"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
            ><span
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              >{{ annualDeclaration.telephoneNumber }}</span
            ><span
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              >{{ supplementaryDeclaration.telephoneNumber }}</span
            ></el-descriptions-item
          >
          <el-descriptions-item
            label="项目联系人"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
            ><span
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              >{{ annualDeclaration.projectContact }}</span
            ><span
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              >{{ supplementaryDeclaration.projectContact }}</span
            ></el-descriptions-item
          >
          <el-descriptions-item
            label="联系人电话"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
            ><span
              v-if="
                annualDeclaration !== null || annualDeclaration != undefined
              "
              >{{ annualDeclaration.contactTelephone }}</span
            ><span
              v-if="
                supplementaryDeclaration !== null ||
                supplementaryDeclaration != undefined
              "
              >{{ supplementaryDeclaration.contactTelephone }}</span
            ></el-descriptions-item
          >
        </el-descriptions>
      </div>
      <!-- 标题 方案申报-->
      <div class="content-title-right">
        <div class="right-title">
          <img src="../../assets/images/icon_16_title.png" alt="" /> 方案申报
        </div>
        <el-descriptions border :column="2">
          <el-descriptions-item
            label="设计单位"
            :span="2"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
            ><span
              v-if="
                schemeDeclaration !== null || schemeDeclaration != undefined
              "
              >{{
                schemeDeclaration.designUnit ? schemeDeclaration.designUnit : ""
              }}</span
            ></el-descriptions-item
          >
          <el-descriptions-item :span="1"
            label="评标方法" 
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content">
            <!-- {{schemeDeclaration ? schemeDeclaration.assessmentMethod === '0' ? '综合评分法' 
            : (schemeDeclaration.assessmentMethod === '1' 
            ? '最低评标价法' 
            : schemeDeclaration.assessmentMethod === '2' 
            ? '性价比法' 
            :schemeDeclaration.assessmentMethod === '3' 
            ? '其他' 
            :'')
            : ''}} -->
            {{schemeDeclaration ? schemeDeclaration.assessmentMethod : ''}}
          </el-descriptions-item>
          <el-descriptions-item :span="1"
            label="项目代码" 
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content">
            {{schemeDeclaration ? schemeDeclaration.projectCode : ''}}
          </el-descriptions-item>
          <el-descriptions-item
            label="系统架构简述"
            :span="2"
            label-class-name="descriptions-item-label-box descriptions-item-height"
            content-class-name="descriptions-item-content descriptions-item-height"
            ><span
              v-if="
                schemeDeclaration !== null || schemeDeclaration != undefined
              "
              >{{
                schemeDeclaration.systemArchitecture
                  ? schemeDeclaration.systemArchitecture
                  : ""
              }}</span
            ></el-descriptions-item
          >
          <!-- <el-descriptions-item
            label="可行性研究报告"
            :span="2"
            label-class-name="descriptions-item-label-box "
            content-class-name="descriptions-item-content"
          >
            <span
              class="pointer blueColor"
              @click="$download(schemeDeclaration.researchReportFile.fileUrl)"
              v-if="
                schemeDeclaration !== null || schemeDeclaration != undefined
              "
              ><img
                src="@/assets/images/tripartite/icon_files.png"
                v-show="
                  schemeDeclaration.researchReportFile != null &&
                  schemeDeclaration.researchReportFile.fileUrl
                "
              />{{
                schemeDeclaration.researchReportFile &&
                schemeDeclaration.researchReportFile != null
                  ? schemeDeclaration.researchReportFile.fileName
                  : ""
              }}
            </span>
            <span v-if="schemeDeclaration.researchReportFile" style="color:red ;position: absolute ;right: 5%;">注：请下载可行性研究报告进行方案在线预审</span>
          </el-descriptions-item> -->
          <el-descriptions-item
            label="可研批复(立项文件)"
            :span="2"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content "
          >
            <span
              class="pointer blueColor"
              @click="$download(schemeDeclaration.budgetProposalFile.fileUrl)"
              v-if="
                schemeDeclaration !== null || schemeDeclaration != undefined
              "
              ><img
                src="@/assets/images/tripartite/icon_files.png"
                v-show="
                  schemeDeclaration.budgetProposalFile != null &&
                  schemeDeclaration.budgetProposalFile.fileUrl
                "
              />{{
                schemeDeclaration.budgetProposalFile &&
                schemeDeclaration.budgetProposalFile != null
                  ? schemeDeclaration.budgetProposalFile.fileName
                  : ""
              }}
            </span>
          </el-descriptions-item>
          <el-descriptions-item
            label="初设方案(可研代初设)"
            :span="2"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
          >
            <span
              class="pointer blueColor"
              @click="
                $download(schemeDeclaration.preliminaryDesignSchemeFile.fileUrl)
              "
              v-if="
                schemeDeclaration !== null || schemeDeclaration != undefined
              "
              ><img
                src="@/assets/images/tripartite/icon_files.png"
                v-show="
                  schemeDeclaration.preliminaryDesignSchemeFile != null &&
                  schemeDeclaration.preliminaryDesignSchemeFile.fileUrl
                "
              />{{
                schemeDeclaration.preliminaryDesignSchemeFile &&
                schemeDeclaration.preliminaryDesignSchemeFile != null
                  ? schemeDeclaration.preliminaryDesignSchemeFile.fileName
                  : ""
              }}
            </span>
            <span v-if="schemeDeclaration.preliminaryDesignSchemeFile" style="color:red ;position: absolute ;right: 5%;">注：请下载初设方案(可研代初设)进行方案在线预审</span>
          </el-descriptions-item>
          <!-- <el-descriptions-item
            label="预算方案"
            :span="2"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
          >
            <span
              class="pointer blueColor"
              @click="$download(schemeDeclaration.budgetProgrammeFile.fileUrl)"
              v-if="
                schemeDeclaration !== null || schemeDeclaration != undefined
              "
              ><img
                src="@/assets/images/tripartite/icon_files.png"
                v-show="
                  schemeDeclaration.budgetProgrammeFile != null &&
                  schemeDeclaration.budgetProgrammeFile.fileUrl
                "
              />{{
                schemeDeclaration.budgetProgrammeFile &&
                schemeDeclaration.budgetProgrammeFile != null
                  ? schemeDeclaration.budgetProgrammeFile.fileName
                  : ""
              }}
            </span>
          </el-descriptions-item> -->
          <!-- <el-descriptions-item
            label="云资源需求清单"
            label-class-name="descriptions-item-label-box"
            content-class-name="descriptions-item-content"
          >
            <span
              class="pointer blueColor"
              @click="
                $download(
                  schemeDeclaration.cloudResourceApplicationFile.fileUrl
                )
              "
              v-if="
                schemeDeclaration !== null || schemeDeclaration != undefined
              "
            >
              <img
                src="@/assets/images/tripartite/icon_files.png"
                v-show="
                  schemeDeclaration.cloudResourceApplicationFile &&
                  schemeDeclaration.cloudResourceApplicationFile.fileName
                "
              />
              {{
                schemeDeclaration.cloudResourceApplicationFile &&
                schemeDeclaration.cloudResourceApplicationFile.fileName
                  ? schemeDeclaration.cloudResourceApplicationFile.fileName
                  : ""
              }}
            </span>
          </el-descriptions-item> -->
        </el-descriptions>
      </div>
      <!-- 系统信息 -->
      <div v-show="systemInfoVoList &&systemInfoVoList.length>0">
        <div class="right-title">
          <img src="../../assets/images/icon_16_title.png" alt="" /> 系统信息
        </div>
        <el-table :data="systemInfoVoList" border>
          <el-table-column
            label="系统名称"
            align="center"
            prop="systemName"
            width="288"
          />
          <el-table-column
            label="系统描述"
            align="center"
            prop="systemDesc"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="是否申请云资源"
            align="center"
            prop="appIsCloud"
            width="288"
          >
            <template slot-scope="scope">
              <span>{{scope.row.appIsCloud==='0'?'否':scope.row.appIsCloud==='1'?'是':''}}</span>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <!-- 政务数据资源目录清单 -->
      <div v-show="governmentDataResourcesVoList &&governmentDataResourcesVoList.length>0">
        <div class="right-title">
          <img src="../../assets/images/icon_16_title.png" alt="" />
          政务数据资源目录清单
        </div>
        <el-table
          :data="governmentDataResourcesVoList"
          border
          class="table_technical"
        >
          <el-table-column
            label="信息资源名称"
            align="center"
            prop="informationResourceName"
            :show-overflow-tooltip="true"
            width="228"
          >
          </el-table-column>
          <el-table-column
            label="信息资源来源系统"
            align="center"
            prop="informationResourceSourceSystem"
            width="228"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label="信息资源源代码"
            align="center"
            prop="informationResourceCode"
            width="228"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label="信息资源提供方"
            align="center"
            prop="informationResourceProvider"
            width="228"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label="提供方内部部门"
            align="center"
            prop="providersInternalDepartment"
            width="228"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label="资源提供方代码"
            align="center"
            prop="resourceProviderCode"
            width="228"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label="信息资源摘要"
            align="center"
            prop="summaryOfInformationResources"
            width="228"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label="信息资源格式分类"
            align="center"
            prop="classificationOfInformationResourceFormats"
            width="228"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label="信息资源格式类型"
            align="center"
            prop="informationResourceFormatType"
            width="228"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label="其他类型资源格式描述"
            align="center"
            prop="other"
            width="228"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label="信息项名称"
            align="center"
            prop="informationItemName"
            width="228"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label="数据类型"
            align="center"
            prop="typeOfData"
            width="228"
          >
          </el-table-column>
          <el-table-column
            label="数据长度"
            align="center"
            prop="dataLength"
            width="120"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label="共享类型"
            align="center"
            prop="shareType"
            width="120"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label="共享条件"
            align="center"
            prop="sharingConditions"
            width="228"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label=" 共享方式分类"
            align="center"
            prop="sharingModeClassification"
            width="120"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label=" 共享方式类型"
            align="center"
            prop="sharingModeType"
            width="120"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label=" 是否向社会开放"
            align="center"
            prop="isOpen"
            width="120"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label=" 开放条件"
            align="center"
            prop="openConditions"
            width="120"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label=" 更新周期"
            align="center"
            prop="updateCycle"
            width="120"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label=" 发布日期"
            align="center"
            prop="releaseDate"
            width="228"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            label=" 平台目录标识"
            align="center"
            prop="platformDirectoryId"
            width="120"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
        </el-table>
      </div>
      <!-- 标题 云资源需求-->
      <div v-show="cloudResourceRequirementVoList && cloudResourceRequirementVoList.length>0">
        <div class="right-title">
          <img src="../../assets/images/icon_16_title.png" alt="" /> 云资源需求
        </div>
        <el-table :data="cloudResourceRequirementVoList" border>
          <el-table-column
            label="资源名称"
            align="center"
            prop="cloudServerName"
          />
          <el-table-column
            label="cpu（核）"
            align="center"
            prop="cpu"
            :show-overflow-tooltip="true"
          />
          <el-table-column label="内存（G）" align="center" prop="memory">
            <template slot-scope="scope">
              <span>{{ scope.row.memory }}</span>
            </template>
          </el-table-column>
          <el-table-column label="硬盘（G）" align="center" prop="hardDisk" />
          <el-table-column label="数量" align="center" prop="number" />
        </el-table>
      </div>
      <!-- 标题 物联设备信息-->
      <div v-show="iotDeviceInfoVoList &&iotDeviceInfoVoList.length>0">
        <div class="right-title right-title1">
          <span
            ><img src="../../assets/images/icon_16_title.png" alt="" />
            物联设备信息</span
          ><span
            ><el-button @click="() => goMonitor()"
              >集约化建设检测</el-button
            ></span
          >
        </div>
        <el-table :data="iotDeviceInfoVoList" border>
          <el-table-column label="产品名称" align="center" prop="productName" />
          <el-table-column
            label="参数"
            align="center"
            prop="deviceParam"
            :show-overflow-tooltip="true"
          />
          <el-table-column label="数量" align="center" prop="deviceNum">
            <!-- <template slot-scope="scope">
                            <span>{{ parseTime(scope.row.createTime) }}</span>
                            </template> -->
          </el-table-column>
          <el-table-column
            label="建设地点"
            align="center"
            prop="constructionSite"
            width="288"
          />
          <el-table-column
            label="设备功能"
            align="center"
            prop="deviceFunction"
          />
          <el-table-column
            label="建设方式"
            align="center"
            prop="constructionWay"
          />
        </el-table>
      </div>
      <!-- 标题 审批进度-->
      <div>
        <div class="right-title">
          <img src="../../assets/images/icon_16_title.png" alt="" /> 审批进度
        </div>
        <el-table :data="approvalsList" border :cell-style="columnStyle">
          <el-table-column
            label="节点"
            align="center"
            :show-overflow-tooltip="true"
          >
            <template slot-scope="scope">
              <span>{{ scope.row.approvalNode }}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="开始时间"
            align="center"
            prop="startTime"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="结束时间"
            align="center"
            prop="endTime"
            :show-overflow-tooltip="true"
          />

          <el-table-column label="状态" align="center" prop="approvalStatus">
            <template slot-scope="scope">
              {{
                scope.row.approvalStatus == 9
                  ? "待接受任务"
                  : scope.row.approvalStatus == 10
                  ? "已接受任务"
                  : scope.row.approvalStatus == 11
                  ? "待审批"
                  : scope.row.approvalStatus == 12
                  ? "已审批"
                  : scope.row.approvalStatus == 16
                  ? "待开始"
                  : scope.row.approvalStatus == 17 ||
                    scope.row.approvalStatus == 18 ||
                    scope.row.approvalStatus == 19
                  ? "已结束"
                  : scope.row.approvalStatus == 61
                  ? "待审核"
                  : scope.row.approvalStatus == 62
                  ? "审核完成"
                  : scope.row.approvalStatus == 63
                  ? "不同意取消"
                  : scope.row.approvalStatus == 64
                  ? "申请取消"
                  : "-"
              }}
            </template>
          </el-table-column>
          <el-table-column
            label="申报详情操作"
            align="center"
            prop="approvalOperation"
          >
            <template slot-scope="scope">
              <!-- 16 现场论证 13 意见汇总 -->
              <!-- <el-button
                size="mini"
                type="text"
                @click="handDialog(scope.row, 1)"
                :disabled="scope.row.endTime != null"
                v-if="
                  scope.row.approvalStatus == 11 &&
                  scope.row.approvalNode != '申请取消'
                "
              >
                审批
              </el-button> -->
              <el-button
                size="mini"
                type="text"
                @click="handDialog(scope.row, 2)"
                v-if="scope.row.approvalStatus == 16"
              >
                查看评审会议详情
              </el-button>
            </template>
          </el-table-column>
          <el-table-column
            label="审批结果"
            align="center"
            prop="approvalResult"
          />
          <el-table-column
            label="资料库"
            align="center"
            prop="relationFile"
          >
            <template slot-scope="scope">
              <el-tooltip class="item" effect="dark" v-for="item in scope.row.relationFile" :key="item.id" :content="item.fileName" placement="left">
                <!-- <a :href="item.fileUrl" style="color:#3171ee" class="files-box">
                  {{item.fileName}}
                </a> -->
                <span style="color:#3171ee" class="files-box" @click="$download(item.fileUrl)">{{item.fileName}}</span>
              </el-tooltip>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <!-- 标题 审批按钮 -->
      <div ref="handleBtn" style="marginTop:22px">
        <el-button type="primary" size="small" @click="handleAudit" :disabled="isDisable">审批</el-button>
      </div>
    </div>
    <MeetingDialog
      :meetingShow="meetingShow"
      :reviewTaskId="reviewTaskId"
      @changeShowDialog="changeShowDialog"
    />
    <!-- 审核结果 弹窗 -->
    <DeclareDialog
      :declareShow="declareShow"
      :proId="proId"
      :expertId="expertId"
      @changeShowDialog="changeShowDialog"
    />
    <!-- 审核结果，申请取消 弹窗 -->
    <DeclareAndConfirmDialog
      :declareAndConfirmDialogShow="declareAndConfirmDialogShow"
      :proId="proId"
      :expertId="expertId"
      :reviewTaskId="reviewTaskId"
      @changeShowDialog="changeShowDialog"
    />
  </div>
</template>

<script>
import { getExpertDetails } from "@/api/manage/manage";
import DeclareDialog from "./components/declareDialog";
import MeetingDialog from "./components/meetingDialog";
import DeclareAndConfirmDialog from "./components/declareAndConfirmDialog";
export default {
  components: {
    DeclareDialog,
    MeetingDialog,
    DeclareAndConfirmDialog,
  },
  data() {
    return {
      reviewTask: {},
      annualDeclaration: {},
      supplementaryDeclaration: {},
      systemInfoVoList: [], //系统信息
      governmentDataResourcesVoList: [], //政务目录清单
      cloudResourceRequirementVoList: [], //云资源需求
      iotDeviceInfoVoList: [], //物联设备信息
      schemeDeclaration: {}, //方案申报
      //审批进度
      approvalsList: [],
      meetingShow: false, //查看会议
      declareShow: false, //预审
      declareAndConfirmDialogShow:false,//预审结果，申请取消
      proId: "", //id
      reviewTaskId: "",
      expertId:"",
      defaultLabel: [
        { approvalNode: "接受任务" },
        { approvalNode: "在线预审" },
        { approvalNode: "重新预审", isShow: false },
        { approvalNode: "申请取消", isShow: false },
        { approvalNode: "现场论证" },
      ],
      auditData:{} , //审批按钮判断数据
      isDisable:false, //审批按钮是否可以点击
    };
  },
  created() {
    this.$nextTick(() => {
      this.getDetails().then(()=>{
        this.handIsDisable();
      });
      
    });
  },
  methods: {
    // 获取详情
    getDetails() {
      let id = this.$route.query.reviewTaskId;
      let erpid = this.$route.query.expertId;
     return getExpertDetails(id, erpid).then((res) => {
        if (res.code == 200) {
          let resData = res.data;
          this.auditData = res.data;
          //年度项目
          if (
            resData.annualDeclarationVo &&
            resData.annualDeclarationVo != null
          ) {
            this.annualDeclaration = resData.annualDeclarationVo;
          }
          //增补项目
          if (
            resData.supplementaryDeclarationVo &&
            resData.supplementaryDeclarationVo != null
          ) {
            this.supplementaryDeclaration = resData.supplementaryDeclarationVo;
          }
          //方案申报
          if (
            resData.schemeDeclarations &&
            resData.schemeDeclarations != null
          ) {
            this.schemeDeclaration = resData.schemeDeclarations;
          }
          this.reviewTask = resData.reviewTask;
          this.systemInfoVoList = resData.systemInfoVoList;
          this.governmentDataResourcesVoList =
            resData.governmentDataResourcesVoList;
          this.cloudResourceRequirementVoList =
            resData.cloudResourceRequirementVoList;
          this.iotDeviceInfoVoList = resData.iotDeviceInfoVoList;
          let data = [];
          if (res.data.approvalList) {
            this.defaultLabel.map((item, index) => {
              let flag = false;
              res.data.approvalList.map((item1) => {
                // if(item.approvalStage==item1.approvalStage){
                if (item.approvalNode == item1.approvalNode) {
                  data.push({ ...item, ...item1 });
                  data.sort(function (a, b) {
                    return (
                      new Date(a.startTime).getTime() -
                      new Date(b.startTime).getTime()
                    );
                  });
                  flag = true;
                  return false;
                  // }
                } else {
                  return false;
                }
              });
              // if (flag == false) {
              //   data.push(item);
              // }
              if (flag == false) {
                if (item.isShow == false) {
                  return;
                } else {
                  data.push(item);
                }
              }
              this.approvalsList = data;
              return false;
            });
          } else {
            this.approvalsList = res.data.approvalList;
          }
        }
      });
    },
    // 表格列样式修改
    columnStyle({ row, column, rowIndex, columnIndex }) {
      if (columnIndex == 0) {
        //第1列的背景色就改变
        return "background:#f8f8f9";
      }
    },
    //弹窗
    handDialog(row, type) {
      this.proId = row.projectId;
      this.expertId = this.$route.query.expertId;
      this.reviewTaskId = this.reviewTask.reviewTaskId;
      if (type == 1) {
        this.declareShow = true;
      } else {
        this.meetingShow = true;
      }
    },
    /** 显示隐藏 弹窗操作 审批按钮*/
    handleAudit(){
      this.proId = this.auditData.projectId;
      this.expertId = this.$route.query.expertId;
      this.reviewTaskId = this.reviewTask.reviewTaskId;
      if(this.auditData.approvalStatus === '11'){
        this.declareAndConfirmDialogShow = true;
      }
    },
    /** 判断审批按钮是否可以点击 */
    handIsDisable(){
      if(this.auditData.approvalStatus === '11'){
        this.isDisable=false;
        window.scrollTo({
          top: this.$refs.handleBtn.offsetTop - 24,
          behavior: "smooth",
        });
      }else{
        this.isDisable=true;
      }
    },
    changeShowDialog(data) {
      if (data == "false") {
        this.declareShow = false;
        this.meetingShow = false;
        this.declareAndConfirmDialogShow = false;
      }else{
        this.declareShow = true;
        this.meetingShow = true;
        this.declareAndConfirmDialogShow = true;
      }
    },
    //返回按钮
    backBtn() {
      this.$router.push({path:'/expert_pro/manage/confirm'})
    },
    //附件下载
    downloadFile(file) {
      if (file) {
        window.location.href = file.fileUrl;
      }
    },
    // 跳转集约化
    goMonitor() {
      this.$router.push({
        path: '/equipmentMonitor',
        query: {
          proid: this.auditData.projectId,
        }
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.annual-page {
  width: 100%;
  background: #f5f5f5;
  padding: 16px;
  font-size: 14px;
  .container-content {
    padding: 24px;
    background: #fff;
    .title {
      font-size: 18px;
      font-family: PingFang SC, PingFang SC-Medium;
      font-weight: 500;
      color: #000000;
      line-height: 18px;
      text-align: left;
      display: flex;
      justify-content: space-between;
      .back-btn {
        // margin-right: 56px;
        font-size: 14px;
        font-family: PingFang SC, PingFang SC-Regular;
        font-weight: 400;
        color: #333333;
        display: flex;
        align-items: center;
        cursor: pointer;
        img {
          margin-right: 7px;
        }
      }
    }
    .table-content-box {
      width: 1600px;
      .add-btn {
        width: 110px;
        height: 32px;
        background: #3171ee;
        border-radius: 4px;
        font-size: 14px;
        font-family: PingFang SC, PingFang SC-Regular;
        font-weight: 400;
        color: #fff;
        display: flex;
        align-items: center;
        margin-bottom: 24px;
        cursor: pointer;
        img {
          margin: 0 7px 0 17px;
          width: 14px;
          height: 14px;
        }
      }
    }
  }
  .right-title {
    // width: 1600px;
    height: 50px;
    line-height: 50px;
    display: flex;
    align-items: center;
    border: 1px solid #ebecef;
    border-right: 0;
    border-left: 0;
    margin: 24px 0;
    img {
      margin-right: 6px;
    }
  }
  .right-title1 {
    display: flex;
    justify-content: space-between;
    > span {
      display: inline-block;
    }
    & > :last-child {
      .el-button {
        width: 130px;
        height: 32px;
        background: #ffffff;
        border: 1px solid #3171ee;
        box-sizing: border-box;
        border-radius: 4px;
        padding: 0;
        font-family: "PingFang SC";
        font-weight: 400;
        font-size: 14px;
        color: #3171ee;
      }
    }
  }
  .blueColor {
    color: #3171ee;
  }
}
.files-box{
  width: 100%;
  line-height: 36px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  float: left;
  cursor: pointer;
}
</style>

<style lang="scss">
.content-title-right {
  /* 信息描述组件样式更改 */
  .descriptions-item-label-box {
    text-align: center !important;
    width: 240px !important;
  }
  .descriptions-item-content {
    text-align: left !important;
    img {
      width: 16px;
      height: 16px;
      margin-right: 10px;
      position: relative;
      top: 4px;
    }
  }
  .cancel-border-top {
    border-top: 0 !important;
  }
  .cancel-border-bottom {
    border-bottom: 0 !important;
  }
  .descriptions-item-height {
    height: 108px;
  }
}
</style>
